<h2><?php echo $this->translate('TITLE_ADMIN_SHOWS_INDEX'); ?></h2>
<form name="appForm" method="post" action="">
    <p style="padding-top: 5px; padding-bottom: 10px;">
        <a class="formbutton" href="<?php echo $this->url(array('controller' => 'shows', 'action' => 'insert')); ?>"><?php echo $this->translate('TITLE_ADMIN_ADD_NEW_SHOWS'); ?></a>
        <a class="formbutton" href="#" onclick="OnSubmitForm('<?php echo $this->url(array('controller' => 'shows', 'action' => 'deleteitems')); ?>')"><?php echo $this->translate('TITLE_ADMIN_SHOWS_BTN_DELETE'); ?></a>
        <a class="formbutton" href="#" onclick="OnSubmitForm('')"><?php echo $this->translate('TITLE_ADMIN_SHOWS_BTN_UPDATE'); ?></a>
    </p>

    <table class="downtable">
        <thead>
        <thead>
            <tr>
                <th class="firstcol" width="5%"><input type="checkbox" name="checkbox" id="checkbox" onclick="checkedAll()"></th>
                <th class="middle" width="30%"><?php echo $this->translate('TITLE_TABLE_SHOWS_NAME'); ?></th>
                <th class="middle" width="25%"><?php echo $this->translate('TITLE_TABLE_SHOWS_PARENT'); ?></th>
                <th class="middle" width="10%"><?php echo $this->translate('TITLE_TABLE_SHOWS_ORDER'); ?></th>
                <th class="middle" width="10%"><?php echo $this->translate('TITLE_TABLE_SHOWS_STATUS'); ?></th>
                <th class="middle" width="15%"><?php echo $this->translate('TITLE_TABLE_SHOWS_CONTROL'); ?></th>
                <th class="thlast" width="5%"><?php echo $this->translate('TITLE_TABLE_SHOWS_ID'); ?></th>
            </tr>
        </thead>

        </thead>
        <tbody>
            <?php
            foreach ($this->list_menu as $key => $value) {
                $order = 'item[' . $value['id'] . ']';
                $order = $this->formText($order, $value['post_order'], array('style' => 'width: 40px; text-align: center;font-size: 11px; border: 1px solid silver; padding: 2px; margin-bottom: 2px;'));
                echo '<tr>';
                echo '<td class="firsttd"><input type="checkbox" name="cid[]" id="cid" value="' . $value['id'] . '"></td>';
                echo '<td class="middle root_tree" style="text-align: left;">' . $value['post_title'] . '</td>';
                echo '<td class="middle">' . $value['post_parent'] . '</td>';
                if ($value['post_status']) {
                    echo '<td class="middle"><a href="' . $this->url(array('controller' => 'shows', 'action' => 'active', 'id' => $value['id'], 'type' => 0)) . '"><div class="active"></div></a></td>';
                } else {
                    echo '<td class="middle"><a href="' . $this->url(array('controller' => 'shows', 'action' => 'active', 'id' => $value['id'], 'type' => 1)) . '"><div class="inactive"></div></a></td>';
                }
                echo '<td class="middle">' . $order . '</td>';
                echo '<td class="last"><a href="' . $this->url(array('controller' => 'shows', 'action' => 'update', 'id' => $value['id'])) . '"><div class="edit"></div></a><a href="' . $this->url(array('controller' => 'shows', 'action' => 'delete', 'id' => $value['id'])) . '"><div class="del"></div></a></td>';
                echo '<td class="last">' . $value['id'] . '</td>';
                echo '</tr>';
            }
            ?>
            <tr>
                <td colspan="7" class="firsttd">
                    <?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml'); ?>
                </td>
            </tr>
        </tbody>
    </table>

    <p style="padding-top: 20px;">
        <a class="formbutton" href="<?php echo $this->url(array('controller' => 'shows', 'action' => 'insert')); ?>"><?php echo $this->translate('TITLE_ADMIN_ADD_NEW_SHOWS'); ?></a>
        <a class="formbutton" href="#" onclick="OnSubmitForm('<?php echo $this->url(array('controller' => 'shows', 'action' => 'deleteitems')); ?>')"><?php echo $this->translate('TITLE_ADMIN_SHOWS_BTN_DELETE'); ?></a>
        <a class="formbutton" href="#" onclick="OnSubmitForm('')"><?php echo $this->translate('TITLE_ADMIN_SHOWS_BTN_UPDATE'); ?></a>
    </p>
</form>